package org.example.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/forward")
public class ForwardController {

    @RequestMapping("/toLogin")
    public String toLogin(){
        return "login";
    }

    @RequestMapping("/toLogout")
    public String toLogout(HttpServletRequest request){
        request.getSession().removeAttribute("empSession");
        return "login";
    }

    @RequestMapping("/toHome")
    public String toHome(){
        return "home";
    }

    @RequestMapping("/toDept")
    public String toDept(){
        return "dept";
    }


    @RequestMapping("/toRole")
    public String toRole(){
        return "role";
    }

    @RequestMapping("/toEmp")
    public String toEmp(){
        return "emp";
    }
    @RequestMapping("/toTestLogin")
    public String toTestLogin(){
        return "test_login";
    }
    //跳转到tester测试者信息界面
    @RequestMapping("/toTester")
    public String toTester(){
        return "tester";
    }

    //登录系统的欢迎界面
    @RequestMapping("/welcome")
    public String welcome(){
        return "welcome";
    }




}
